home *** CD-ROM | disk | FTP | other *** search
- Path: zetnet.co.uk!demon!stsdaveb.demon.co.uk
- From: dave@stsdaveb.demon.co.uk (Dave Thornton)
- Newsgroups: comp.lang.c
- Subject: Re: Check for dll
- Date: Thu, 25 Jan 1996 16:48:15 GMT
- Organization: Severn Trent Systems
- Message-ID: <3107b1f8.9170223@news.demon.co.uk>
- References: <3106341E.1B00@ubs.ch>
- NNTP-Posting-Host: stsdaveb.demon.co.uk
- X-NNTP-Posting-Host: stsdaveb.demon.co.uk
- X-Newsreader: Forte Agent .99c/16.141
-
- On Wed, 24 Jan 1996 14:29:02 +0100, Daniel Ponti <daniel.ponti@ubs.ch>
- wrote:
-
- >Is there a possibility to check for a specific dll in the memory?
- >I have not found a windows api function. There is only one to free
- >a dll by its handler (FreeLibrary) and one to load a dll
- >(LoadLibrary) but no one for check a dll already in the memory.
- >
- >Thanks for any hints
- >Daniel
-
- Daniel
- There are two windows functions ModuleFirst() and ModuleNext() both
- take an ME structure as a parameter. These functions walk down the
- Windows module list returning all modules loaded in memory ie EXE's
- DLL's, Driver's font's etc.
-
- Within the MEstructure are such things as usage count, handle of
- module, module name and module exepath. The exepath contains the full
- pathname of where the module came from ie myapp.dll.
-
- Its use is very akin to the DosFindFirst() and DosFindNext()
- functions used in dos to read files on disk.
- If you want the source of the code I wrote as an excersise in seeing
- what modules where loaded then email me directly.
-
- Regards
-
-
- -------------------------------------------------------------------------------
- | Dave Thornton | email dave@stsdaveb.demon.co.uk |
- | Staffs, England | |
- -------------------------------------------------------------------------------
-